Assignment 4: Paint Pots

processing.png
Introduction:
There are many 'paint' programs for computers. The most famous, of course, is Microsoft Paint that has been on all computers running Windows since Windows 1.0 was released in 1985.
Your job is to create a very, very simplified version of Paint called "Paint Pots". It will only have 3 colors, the brush can't be changed and there will be no eraser. Even so, you can create a beautiful picture!

Assignment:
Your assignment is to create a basic painting program in processing.
There should be 3 paint pots of different colors on the screen. When your mouse moves in to one of the pots, it will pick up the color of the pot.
If you click, you can paint using that color.

You can view a demo of this on the transfer drive in X:\MSIT\demos

Requirements:
  • Name, program title and description in comments: 2 pt
  • Helpful comments throughout: 1pt
  • Code is readable (good variable names, organized and easy to understand): 1pt
  • Cursor color changes correctly as it enters a 'paint pot': 4pts
  • When you click, 'painting' happens: 1pt
  • When you don't click no painting happens: 1pt

Hints:
  • Depending on how you structure your code, you may need to learn how to use a new data type: color
  • Use this code to display the X and Y coordinates on your screen: this will help you set up your conditional statements.
void draw(){
  background(0);
  text("mouseX: "+mouseX,15,15); //display text at (15,15)
  text("mouseY: "+mouseY,15,25); //display text at (15,25)
}
  • Don't use background() in draw() or you won't see your painting when you want to!
  • The size should be around 300x300 - bigger or smaller is okay though

Bonus:
  • create a place where you can see the currently selected color +1 pt
  • make a button that will clear your drawing: +1pt
  • make a button that will let you change what shape you draw with (e.g. change from drawing with circles, to drawing with a square): +2pts
  • make buttons to increase and decrease the size of the cursor +2pts

Template:
If you're having trouble getting started, please use this template file to help you. The comments will give you the basic outline of what you should be doing.
You do not have to use this template. It is completely optional.
/***
 *
 * Author: <your name here>
 * Title: <title goes here>
 * Description: <description goes here>
 *
 ***/
 
void setup(){
  size (300,300);
  background(0);
  noStroke();
  smooth();
}
void draw(){
 
  //draw circles if you press the mouse!
  if(mousePressed){
    //draw the mouse cursor with the right color
 
  }
 
  //draw paint pots
 
  //figure out if mouse is inside a paint pot
 
  //if the mouse is inside a pot, change the color
 
}